<%@ page language="java" contentType="text/html; charset=utf-8"	pageEncoding="utf-8"%>
<%@ page language="java" import="java.util.*" %>
<%@ page language="java" import="com.egg.common.Constants" %>
<%@ include file="../../common/tag.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>添加用户</title>
<link href="<%=basePath %>/resource/css/frame.css" type=text/css rel=stylesheet>
<script type="text/javascript" src="<%=basePath%>/resource/js/checkForm.js"></script>
<script type="text/javascript" src="<%=basePath%>/resource/js/jquery-1.4.4.min.js"></script>
</head>
<body>
<table cellSpacing=1 cellPadding=3 width="99%" bgColor=#6298e1 border=0>
	   <tr>
	     <td height=25 class="specialTd">
	       	<span class="whiteWord">用户管理：添加用户</span>
	    </td>
	  </tr>
	   <tr>
	    <td  bgColor=#ebf2f9 height=30>
	      <table cellSpacing=0 width="99%" border=0>
		          <tr>
		          	<td align="center"><input type="submit" name="Submit" value="确定">
			<input type="button" name="Submit2" value="返回" onclick="return history.go(-1);" ></td>
		          </tr>
	       </table>
	    </td>
	   </tr>
</table>
<table cellSpacing=1 cellPadding=0 width="99%" border=0>
  <tbody>
  <tr>
    <td height=10></td>
  </tr>
  </tbody>
</table>
<form action="<%=basePath %>/user/addOrUpdateUser.action"  method="post" id="userForm">
<input type="hidden" name="userId" id="userId" value="${userList.get(0).get('ID')}"/>
<table cellSpacing=1 cellPadding=3 width="99%" bgColor=#6298e1 border=0>
	<tr>
		<td bgColor=#ebf2f9>账号</td>
		<td bgColor=#ebf2f9><input type="text" name="userAccount" id="userAccount" value="${userList.get(0).get('USER_ACCOUNT')}"/></td>
		<td bgColor=#ebf2f9>名称</td>
		<td bgColor=#ebf2f9><input type="text" name="userName" id="userName" value="${userList.get(0).get('USER_NAME')}" />	</td>
	</tr>
	<tr>
	    <td bgColor=#ebf2f9>密码</td>
		<td bgColor=#ebf2f9><input type="password" name="userPassword" id="userPassword" value="${userList.get(0).get('USER_PASSWORD') }" /></td>
		<td bgColor=#ebf2f9>确认密码</td>
		<td bgColor=#ebf2f9><input type="password" name="confirmPassword" id="confirmPassword" value="${userList.get(0).get('USER_PASSWORD') }" /></td>
	</tr>
	<tr>
		<td bgColor=#ebf2f9>性别</td>
		<td bgColor=#ebf2f9><s:radio  list="#{'1':'男','0':'女'}" name="userSex"  id="userSex"  theme="simple" value="userList.get(0).get('USER_SEX')"></s:radio></td>
		<td bgColor=#ebf2f9>手机</td>
		<td bgColor=#ebf2f9><input type="text" name="userPhone" id="userPhone" value="${userList.get(0).get('USER_PHONE') }"/></td>
		
	</tr>
	<%
		if(String.valueOf(session.getAttribute("userType")).equals(Constants.USER_TYPE_SUPERSYSTEM)){
			%>
		<tr>
			<td bgColor=#ebf2f9>部门</td>
			<td bgColor=#ebf2f9 colspan="3">
				<s:select list="deptList" headerKey="--" headerValue="--" listKey="DEPT_ID" listValue="DEPT_NAME" name="deptId" id="deptId" theme="simple" value="userList.get(0).get('DEPT_ID')"></s:select>
			</td>
		</tr>
			<%
		}
	%>
	
	<tr>
		<td colspan="4" class="submitTd">
			<input type="button" name="Submit" value="确定" onclick="return checkUserForm()">
			<input type="button" name="Submit2" value="返回" onclick="return history.go(-1);" >
		</td>
	</tr>
</table>
</form>
</body>
</html>